package com.action;

import com.entity.LoginEntity;
import com.opensymphony.xwork2.ActionSupport;
import com.service.loginVerifyService;

public class loginAction  extends ActionSupport{
	private static final long serialVersionUID = 1L;
	private LoginEntity loginEntity;
	private loginVerifyService loginService = new loginVerifyService();
	public LoginEntity getLoginEntity() {
		return loginEntity;
	}

	public void setLoginEntity(LoginEntity loginEntity) {
		this.loginEntity = loginEntity;
	}

	public loginVerifyService getLoginService() {
		return loginService;
	}

	public void setLoginService(loginVerifyService loginService) {
		this.loginService = loginService;
	}

	public String verify() {
		return loginService.verify(loginEntity);
	}
	
	public String visitor() {
		loginEntity.setType("visitor");
		loginEntity.setUseraccount(null);
		loginEntity.setPassword(null);
		loginEntity.setUsername("visitor");
		return "visitor";
	}
}
